package edu.gatech.cs2340.mule.model;
import java.io.Serializable;


/**
 * 
 * This class represent's a race that a player can be in the game
 * of MULE
 * 
 * @author Ryan Swing
 *
 */
public class Race implements Serializable {

	private static final long serialVersionUID = -1719538823700357537L;
	
	private final int FLAPPER_STARTING_MONEY = 1600;
	private final int HUMAN_STARTING_MONEY = 600;
	private final int OTHER_STARTING_MONEY = 1000;
	private int startingMoney;
	private String raceName;
	
	/**
	 * Creates a new race to be assigned to a player
	 * 
	 * @param s The kind of race
	 */
	public Race(String s) {
		raceName = s;
		if (s.equals("Human")) {
			startingMoney = HUMAN_STARTING_MONEY;
		}
		else if (s.equals("Flapper")) {
			startingMoney = FLAPPER_STARTING_MONEY;
		}
		else {
			startingMoney = OTHER_STARTING_MONEY;
		}
	}
	
	/**
	 * 
	 * Returns the amount of money the player should start with
	 * based upon the race
	 * 
	 * @return The amount of starting money
	 */
	public int returnMoney() {
		return startingMoney;
	}
	
	/**
	 * 
	 * @return The name of the race
	 */
	public String getRaceName() {
		return raceName;
	}
}
